//
//  CustomModelAlert.m
//  MacDevTest
//
//  Created by 夏利兵 on 2020/8/5.
//  Copyright © 2020 com.lbx. All rights reserved.
//

#import "CustomModelAlert.h"

@interface CustomModelAlert ()

@end

@implementation CustomModelAlert

- (void)windowDidLoad {
    [super windowDidLoad];
    
    // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
}

- (IBAction)cancel:(id)sender {
    
    [self.window close];
    
    [NSApp stopModal];
    
    if (_onCancel) {
        _onCancel();
    }
}

- (void)showWindow:(id)sender
{
    [NSApp runModalForWindow:self.window];
}

@end
